package com.kingyun.gpsinspection.purificationservice.services.tdm.innerservice.impl;

import com.kingyun.gpsinspection.purificationservice.dao.mapper.tdm.QueryMTAndPIMapper;
import com.kingyun.gpsinspection.purificationservice.facade.model.tdm.QueryMTAndPIVo;
import com.kingyun.gpsinspection.purificationservice.facade.service.tdm.QueryMTAndPIService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * 定时任务查询维护保养与巡回检查数据
 * Created by jiangjx on 2017/3/1.
 */
public class QueryMTAndPIServiceImpl implements QueryMTAndPIService {

    @Autowired
    private QueryMTAndPIMapper queryMTAndPIMapper;

    /**
     * 查询巡回检查与维护保养中符合条件的主任务
     *
     * @return List<QueryMTAndPIVo>
     */
    @Override
    public List<QueryMTAndPIVo> queryMTAndPIList() {
        return queryMTAndPIMapper.queryMTAndPIList();
    }

    /**
     * 根据主任务ID查询子任务列表
     *
     * @param taskId 主任务id
     * @return List<QueryMTAndPIVo>
     */
    @Override
    public List<QueryMTAndPIVo> querySubtask(String taskId) {
        return queryMTAndPIMapper.querySubtask(taskId);
    }
}
